@import "~scss/variables";

.sw-product-restriction-selection {
    .sw-product-restriction-selection__container {
        box-sizing: border-box;
        background-color: transparent;
        margin-bottom: 10px;

        .sw-product-restriction-selection__select-group-wrapper {
            display: grid;
            box-sizing: border-box;
            grid-template-columns: minmax(150px, 200px) minmax(120px, 150px);
            background-color: $color-white;
            max-height: 48px;
            border-radius: 4px 0 0 4px;
            border-top: 1px solid $color-gray-300;
            border-bottom: 1px solid $color-gray-300;
        }

        .sw-block-field__block {
            border-width: 0;
        }

        .sw-field.sw-product-restriction-selection__select-group {
            margin-bottom: 0;
        }

        .sw-field.sw-product-restriction-selection__select-group select {
            color: $color-white;
            background-color: #758ca3;
            border-width: 0;
        }

        .sw-field.sw-product-restriction-selection__select-group .sw-field__select select:focus {
            color: $color-white;
        }

        .sw-field.sw-product-restriction-selection__select-group .sw-field__input {
            display: flex;
            position: relative;
        }

        .sw-field.sw-product-restriction-selection__select-group .sw-field__input::before {
            content: "";
            box-sizing: border-box;
            position: absolute;
            height: 45px;
            width: 25px;
            right: 0;
        }

        .sw-field.sw-product-restriction-selection__select-group .sw-field__input::after {
            content: "";
            position: relative;
            width: 0;
            height: 0;
            border-style: solid;
            border-width: 24px 0 21px 16px;
            border-color: transparent transparent transparent #758ca3;
            right: 2px;
        }

        .sw-field.sw-product-restriction-selection__select-group .mt-icon {
            color: $color-white;
        }

        .sw-field.sw-product-restriction-selection__select-group .sw-field__select select:focus + .mt-icon {
            color: $color-white;
        }

        .sw-product-restriction-selection__isFrom {
            display: flex;
            position: relative;
            z-index: 1;
            justify-content: center;
            align-items: center;
            height: 45px;
            margin-right: 16px;
            padding-right: 8px;
        }

        .sw-product-restriction-selection__isFrom::after .sw-product-restriction-selection__isFrom::before {
            content: "";
            position: absolute;
            width: 0;
            height: 0;
            border-style: solid;
            border-width: 24px 0 21px 16px;
            border-color: transparent transparent transparent $color-gray-300;
            right: 0;
            transform: translate(calc(100% + 1px), 0);
        }

        .sw-product-restriction-selection__isFrom::before {
            background-color: #fff;
        }

        .sw-product-restriction-selection__isFrom::after {
            border-color: transparent transparent transparent $color-white;
            right: 1px;
        }

        .sw-multi-select {
            border: 1px solid $color-gray-300;
            border-radius: 0;
        }

        .sw-multi-select .sw-multi-select__selection-item-input {
            max-width: 0;
        }

        .sw-multi-select .sw-multi-select__results {
            border-color: $color-gray-300;
        }

        .sw-multi-select .sw-multi-select__results-list {
            max-height: 140px;
        }

        .sw-product-restriction-selection__select-option-wrapper .sw-context-button {
            display: flex;
            justify-content: center;
            height: 48px;
            align-items: center;
            background-color: $color-white;
            border: 1px solid $color-gray-300;
            border-left-width: 0;
            border-top-right-radius: 4px;
            border-bottom-right-radius: 4px;
        }

        .sw-block-field {
            .sw-block-field__block {
                height: auto;
            }
        }

        .mt-select.sw-product-restriction-selection__select-group {
            margin-top: -1px;
        }
    }
}
